ImagXpress 13 for ActiveX - User Guide > How To > Load an Image > Load Image from Buffer |
To load an image stored in memory, use the LoadBuffer method, if a locked global handle to the image data is available. Use the LoadBufferPtr method if a pointer to the image data stored in memory is available.
The Microsoft Windows® API call GlobalLock can be used to get a pointer to the data in memory. A Microsoft Windows API GlobalUnlock should be called when the memory is no longer needed. The Microsoft Windows API GlobalSize will tell you the size of the data (in bytes).
When an image loads using the LoadBuffer or LoadBufferPtr methods, the image data decompresses and converts to a DIB. The DIB, along with the image's palette information, tag information and color profile information store in the target ImagXpress buffer (identified by the ProcessImageID property). The ViewImageID property is set to the newly loaded image, enabling the display of the new image.